package cn.jiyun.ai.controller;

import cn.jiyun.ai.common.Result;
import cn.jiyun.ai.pojo.Message;
import cn.jiyun.ai.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/message/")
public class MessageController {
    @Autowired
    MessageService messageService;

    @PostMapping("saveMessage")
    public Result saveMessage(@RequestBody Message message)
    {
        return messageService.saveMessage(message);
    }
}
